In [1]:
import pandas as pd
import plotly.express as px

vn_index = pd.read_csv('C:/Users/DUC/Documents/Data/Index/VN Historical Data Weekly.csv')
nifty_50_index = pd.read_csv('C:/Users/DUC/Documents/Data/Index/Nifty 50 Historical Data Weekly.csv')
chile_index = pd.read_csv('C:/Users/DUC/Documents/Data/Index/Chile S&P CLX IPSA Historical Data Weekly.csv')
shanghai_index = pd.read_csv('C:/Users/DUC/Documents/Data/Index/Shanghai Composite Historical Data Weekly.csv')
dhaka_index = pd.read_csv('C:/Users/DUC/Documents/Data/Index/Dhaka Stock Exchange Broad Historical Data Weekly.csv')

Main stock index

In [145]:
vn_index['Label'] = ['VN_INDEX'] * len(vn_index)
vn_index = vn_index.iloc[::-1,:].reset_index()

nifty_50_index['Label'] = ['NIFTY_50'] * len(nifty_50_index)
nifty_50_index = nifty_50_index.iloc[::-1,:]

chile_index['Label'] = ['CHILE_INDEX'] * len(chile_index)
chile_index = chile_index.iloc[::-1,:]

shanghai_index['Label'] = ['SHANGHAI_COMPOSITE'] * len(shanghai_index)
shanghai_index = shanghai_index.iloc[::-1,:].reset_index()

dhaka_index['Label'] = ['DHAKA_INDEX'] * len(dhaka_index)  
dhaka_index = dhaka_index.iloc[::-1,:]

df = pd.concat([chile_index,shanghai_index,vn_index,nifty_50_index,dhaka_index], axis =0)
df.describe()
Out[145]:
level_0 index
count 2511.000000 2511.000000
mean 649.336918 649.336918
std 398.324094 398.324094
min 0.000000 0.000000
25% 313.500000 313.500000
50% 627.000000 627.000000
75% 941.000000 941.000000
max 1490.000000 1490.000000
In [146]:
df
Out[146]:
Date Price Open High Low Vol. Change % Label level_0 index
0 May 17, 2020 3,763.21 3,622.15 3,782.21 3,622.15 - 3.34% CHILE_INDEX NaN NaN
1 May 10, 2020 3,641.64 3,820.96 3,863.03 3,534.32 - -4.63% CHILE_INDEX NaN NaN
2 May 03, 2020 3,818.24 3,977.56 4,036.99 3,818.24 - -4.01% CHILE_INDEX NaN NaN
3 Apr 26, 2020 3,977.56 3,679.67 4,020.21 3,679.67 - 8.10% CHILE_INDEX NaN NaN
4 Apr 19, 2020 3,679.67 3,819.61 3,822.83 3,645.38 - -3.66% CHILE_INDEX NaN NaN
... ... ... ... ... ... ... ... ... ... ...
368 Mar 03, 2013 3,832.85 3,832.85 3,832.85 3,832.85 - -3.53% DHAKA_INDEX NaN NaN
369 Feb 24, 2013 3,973.28 3,973.28 3,973.28 3,973.28 - -4.38% DHAKA_INDEX NaN NaN
370 Feb 17, 2013 4,155.45 4,155.45 4,155.45 4,155.45 - -3.47% DHAKA_INDEX NaN NaN
371 Feb 10, 2013 4,304.97 4,304.97 4,304.97 4,304.97 - 2.51% DHAKA_INDEX NaN NaN
372 Feb 03, 2013 4,199.58 4,199.58 4,199.58 4,199.58 - 1.53% DHAKA_INDEX NaN NaN

5555 rows × 10 columns

In [147]:
fig_line = px.line(df, x='Date', y='Price', color='Label')
fig_line.show()
In [ ]:

In [22]:
gdp_worldbank = pd.read_csv('C:/Users/DUC/Documents/Data/GDP/GDP_by_country_Data_WorldBank.csv')
gdp_worldbank = gdp_worldbank.T
columns = gdp_worldbank[0:1][:].values
gdp_worldbank.columns = columns[0]
gdp_worldbank = gdp_worldbank[1:]
index = [i for i in range(0,30)]
In [23]:
gdp_worldbank.head()
Out[23]:
Algeria American Samoa Andorra Angola Antigua and Barbuda Argentina Armenia Aruba Australia Austria ... Uruguay Uzbekistan Vanuatu Venezuela, RB Vietnam Virgin Islands (U.S.) West Bank and Gaza Yemen, Rep. Zambia Zimbabwe
2028553750.00 62045099642.78 .. 1029048481.88 11228764963.16 459469058.89 141352368714.69 2256838858.43 764887117.19 310777222008.47 166463386663.44 ... 9298839655.23 13360607917.88 158397403.04 48598315565.03 6471740805.57 .. .. 5647119229.01 3285217391.30 8783816700.00
1099559027.78 45715367087.10 .. 1106928582.87 10603784541.20 481706333.33 189719984268.49 2068526521.90 872138730.75 325310415195.04 173794177725.40 ... 11205971155.28 13677622222.22 188869985.67 53476971830.99 9613369520.42 .. .. 5930370370.37 3378882352.94 8641481700.00
652174990.84 48003298223.12 .. 1210013651.88 8307810973.59 499281148.15 228788617201.70 1272577456.13 958463200.21 324878874105.98 195078126346.11 ... 12878199880.98 12941297376.09 196142585.01 60401798245.61 9866990236.44 .. .. 6463649985.02 3181921787.71 6751472200.00
1185315468.46 49946455210.97 .. 1007025755.00 5768720421.61 535172777.78 236741715015.02 1201313201.01 1082979707.66 311544406970.21 190379720927.48 ... 15002106518.48 13099013835.51 188080374.40 60065011013.22 13180953598.17 .. .. 5368270614.85 3273237853.36 6563813300.00
1880951520.40 42542571305.51 .. 1017549124.33 4438321017.39 589429592.59 257440000000.00 1315158670.28 1245688253.11 322211691456.24 203535242741.84 ... 17474647792.38 12899156990.62 219260341.05 58418666666.67 16286433533.32 .. 2843300000.00 4167356037.15 3656647744.25 6890675000.00

5 rows × 215 columns

GDP

In [24]:
years = [i for i in range(1990,2019)]
vietnam_gdp = pd.DataFrame({'years' : years, 'gdp' : gdp_worldbank['Vietnam'].values, 'label' : ['VietNam'] * 29})
china_gdp = pd.DataFrame({'years' : years,'gdp' : gdp_worldbank['China'].values, 'label' : ['China'] * 29})
india_gdp = pd.DataFrame({'years' : years,'gdp' : gdp_worldbank['India'].values, 'label' : ['India'] * 29})
chile_gdp = pd.DataFrame({'years' : years,'gdp' : gdp_worldbank['Chile'].values, 'label' : ['Chile'] * 29})
bangladesh_gdp = pd.DataFrame({'years' : years,'gdp' : gdp_worldbank['Bangladesh'].values, 'label' : ['Bangladesh'] * 29})
In [25]:
new_world_gdp_with_label = pd.concat([vietnam_gdp, china_gdp, india_gdp, chile_gdp, bangladesh_gdp], axis =0)
In [26]:
new_world_gdp_with_label.tail()
Out[26]:
years gdp label
24 2014 172885454931.45 Bangladesh
25 2015 195078678697.23 Bangladesh
26 2016 221415188000.48 Bangladesh
27 2017 249723862487.36 Bangladesh
28 2018 274024958965.89 Bangladesh
In [27]:
fig_line = px.line(new_world_gdp_with_label, x='years', y='gdp', color='label')
fig_line.show()

Net ODA per Capita

In [133]:
net_oda_per_capita = pd.read_csv('C:/Users/DUC/Documents/Data/GDP/Net_ODA_per_capita.csv')
net_oda_per_capita = net_oda_per_capita.T
columns = net_oda_per_capita[0:1][:].values
net_oda_per_capita.columns = columns[0]
net_oda_per_capita = net_oda_per_capita[1:]
index = [i for i in range(0,30)]
net_oda_per_capita.head()
Out[133]:
Albania Algeria American Samoa Andorra Angola Antigua and Barbuda Argentina Armenia Aruba Australia ... Uruguay Uzbekistan Vanuatu Venezuela, RB Vietnam Virgin Islands (U.S.) West Bank and Gaza Yemen, Rep. Zambia Zimbabwe
9.89 3.36 12.88 .. .. 22.43 73.73 5.26 .. 482.39 .. ... 14.77 .. 319.23 4.10 2.66 .. .. 38.41 59.08 32.04
38.24 101.61 8.00 .. .. 22.62 114.10 8.40 0.78 386.40 .. ... 13.35 .. 306.07 1.55 3.27 .. .. 24.09 106.46 36.39
14.14 126.16 13.87 .. .. 27.15 72.44 7.96 6.52 439.36 .. ... 20.82 0.07 250.05 1.69 7.99 .. .. 19.59 121.97 72.49
14.15 83.87 11.81 .. .. 22.13 45.61 7.24 32.55 342.88 .. ... 35.86 0.36 209.96 2.00 3.46 .. 78.99 23.01 100.15 45.01
13.26 50.85 10.47 .. .. 33.11 61.90 4.68 58.25 238.07 .. ... 23.43 1.26 247.06 1.28 12.16 .. 199.46 12.01 80.63 49.85

5 rows × 216 columns

In [134]:
years = [i for i in range(1990,2019)]
vietnam_net_oda_per_capita = pd.DataFrame({'years' : years, 'net_oda_per_capita' : net_oda_per_capita['Vietnam'].values, 'label' : ['VietNam'] * 29})
china_net_oda_per_capita = pd.DataFrame({'years' : years,'net_oda_per_capita' : net_oda_per_capita['China'].values, 'label' : ['China'] * 29})
india_net_oda_per_capita = pd.DataFrame({'years' : years,'net_oda_per_capita' : net_oda_per_capita['India'].values, 'label' : ['India'] * 29})
chile_net_oda_per_capita = pd.DataFrame({'years' : years,'net_oda_per_capita' : net_oda_per_capita['Chile'].values, 'label' : ['Chile'] * 29})
bangladesh_net_oda_per_capita = pd.DataFrame({'years' : years,'net_oda_per_capita' : net_oda_per_capita['Bangladesh'].values, 'label' : ['Bangladesh'] * 29})
In [135]:
new_net_oda_per_capita = pd.concat([vietnam_net_oda_per_capita, china_net_oda_per_capita, india_net_oda_per_capita, chile_net_oda_per_capita, bangladesh_net_oda_per_capita]) 
new_net_oda_per_capita.head()
Out[135]:
years net_oda_per_capita label
0 1990 2.66 VietNam
1 1991 3.27 VietNam
2 1992 7.99 VietNam
3 1993 3.46 VietNam
4 1994 12.16 VietNam
In [136]:
fig_line = px.line(new_net_oda_per_capita, x = 'years', y = 'net_oda_per_capita', color = 'label')
fig_line.show()

Enegy used

In [138]:
enegy_used_per_capita = pd.read_csv('C:/Users/DUC/Documents/Data/GDP/Enegy_used_per_capita.csv')
enegy_used_per_capita = enegy_used_per_capita.T
columns = enegy_used_per_capita[0:1][:].values
enegy_used_per_capita.columns = columns[0]
enegy_used_per_capita = enegy_used_per_capita[1:]
index = [i for i in range(0,30)]
enegy_used_per_capita.head()
Out[138]:
Albania Algeria American Samoa Andorra Angola Antigua and Barbuda Argentina Armenia Aruba Australia ... Uruguay Uzbekistan Vanuatu Venezuela, RB Vietnam Virgin Islands (U.S.) West Bank and Gaza Yemen, Rep. Zambia Zimbabwe
.. 813.2556955 861.2607564 .. .. 496.5364903 1580.532114 1412.179829 2178.54366 .. 5061.508459 ... 723.9362864 2260.766943 159.060973 2016.410915 262.7789681 .. .. 214.6409481 678.0414454 891.1895906
...1 572.781844 888.8753117 .. .. 491.8025707 .. 1435.484658 2317.914116 .. 4927.78159 ... 779.5131017 2294.824122 .. 2057.526013 260.7910479 .. .. 248.6438927 679.0067392 922.6941872
...2 418.2866298 888.7352846 .. .. 478.585592 .. 1489.347594 1199.772454 .. 4959.214919 ... 855.2302388 2110.495548 .. 2249.821101 266.6514925 .. .. 257.9004188 672.5737329 933.5933336
...3 412.3788805 872.3076809 .. .. 479.8198462 .. 1474.306546 651.9368394 .. 5147.53665 ... 792.2640111 2146.183119 .. 2049.503921 283.6491513 .. .. 212.1061963 657.317646 877.6794715
...4 441.2492954 823.5765268 .. .. 470.9386217 .. 1548.623258 419.8214983 .. 5089.788967 ... 751.254783 2082.15288 .. 2324.974555 278.64529 .. .. 211.1777679 645.9667363 858.3104002

5 rows × 216 columns

In [143]:
years = [i for i in range(1990,2020)]
num_of_years = 30
vietnam_enegy_used_per_capita = pd.DataFrame({'years' : years, 'enegy_used_per_capita' : enegy_used_per_capita['Vietnam'].values, 'label' : ['VietNam'] * num_of_years})
china_enegy_used_per_capita = pd.DataFrame({'years' : years,'enegy_used_per_capita' : enegy_used_per_capita['China'].values, 'label' : ['China'] * num_of_years})
india_enegy_used_per_capita = pd.DataFrame({'years' : years,'enegy_used_per_capita' : enegy_used_per_capita['India'].values, 'label' : ['India'] * num_of_years})
chile_enegy_used_per_capita = pd.DataFrame({'years' : years,'enegy_used_per_capita' : enegy_used_per_capita['Chile'].values, 'label' : ['Chile'] * num_of_years})
bangladesh_enegy_used_per_capita = pd.DataFrame({'years' : years,'enegy_used_per_capita' : enegy_used_per_capita['Bangladesh'].values, 'label' : ['Bangladesh'] * num_of_years})
In [144]:
new_enegy_used_per_capita = pd.concat([vietnam_enegy_used_per_capita,china_enegy_used_per_capita,india_enegy_used_per_capita,chile_enegy_used_per_capita,bangladesh_enegy_used_per_capita])
new_enegy_used_per_capita.head()
Out[144]:
years enegy_used_per_capita label
0 1990 262.7789681 VietNam
1 1991 260.7910479 VietNam
2 1992 266.6514925 VietNam
3 1993 283.6491513 VietNam
4 1994 278.64529 VietNam
In [145]:
fig_line = px.line(new_enegy_used_per_capita, x = 'years', y = 'enegy_used_per_capita', color = 'label')
fig_line.show()

Stock market cap

In [13]:
world_stock_marketcap = pd.read_csv('C:/Users/DUC/Documents/Data/GDP/WorldStockMarketCap.csv')
world_stock_marketcap = world_stock_marketcap.T
columns = world_stock_marketcap[0:1][:].values
world_stock_marketcap.columns = columns[0]
world_stock_marketcap = world_stock_marketcap[1:]
world_stock_marketcap.head()
Out[13]:
Afghanistan Albania Algeria American Samoa Andorra Angola Antigua and Barbuda Argentina Armenia Aruba ... Post-demographic dividend Pre-demographic dividend Small states South Asia South Asia (IDA & IBRD) Sub-Saharan Africa Sub-Saharan Africa (excluding high income) Sub-Saharan Africa (IDA & IBRD countries) Upper middle income World
1990 [YR1990] .. .. .. .. .. .. .. 3615300000 .. .. ... 9.02269E+12 .. .. .. .. .. .. .. .. 9.37975E+12
1991 [YR1991] .. .. .. .. .. .. .. 18639700000 .. .. ... 1.06183E+13 .. .. .. .. .. .. .. .. 1.11851E+13
1992 [YR1992] .. .. .. .. .. .. .. 18623100000 .. .. ... 1.00755E+13 .. .. .. .. .. .. .. .. 1.07053E+13
1993 [YR1993] .. .. .. .. .. .. .. 44055310000 .. .. ... 1.25889E+13 .. .. .. .. .. .. .. .. 1.37642E+13
1994 [YR1994] .. .. .. .. .. .. .. 36867200000 .. .. ... 1.33118E+13 .. .. .. .. 2.71254E+11 2.71254E+11 2.71254E+11 .. 1.44702E+13

5 rows × 264 columns

In [16]:
years = [i for i in range(1990,2020)]
num_of_years = 30
vietnam_stock_marketcap = pd.DataFrame({'years' : years, 'stock_marketcap' : world_stock_marketcap['Vietnam'].values, 'label' : ['VietNam'] * num_of_years})
china_stock_marketcap = pd.DataFrame({'years' : years,'stock_marketcap' : world_stock_marketcap['China'].values, 'label' : ['China'] * num_of_years})
india_stock_marketcap = pd.DataFrame({'years' : years,'stock_marketcap' : world_stock_marketcap['India'].values, 'label' : ['India'] * num_of_years})
chile_stock_marketcap = pd.DataFrame({'years' : years,'stock_marketcap' : world_stock_marketcap['Chile'].values, 'label' : ['Chile'] * num_of_years})
bangladesh_stock_marketcap = pd.DataFrame({'years' : years,'stock_marketcap' : world_stock_marketcap['Bangladesh'].values, 'label' : ['Bangladesh'] * num_of_years})

new_world_stock_marketcap = pd.concat([vietnam_stock_marketcap,china_stock_marketcap,india_stock_marketcap,chile_stock_marketcap,bangladesh_stock_marketcap])
In [29]:
import plotly.express as px
fig_line = px.line(new_world_stock_marketcap, x = 'years', y = 'stock_marketcap', color = 'label')
fig_line.show()
In [30]:
fig_line = px.line(new_world_gdp_with_label, x='years', y='gdp', color='label')
fig_line.show()

Inflation

In [32]:
world_inflation = pd.read_csv('C:/Users/DUC/Documents/Data/GDP/Inflation.csv')
world_inflation = world_inflation.T
columns = world_inflation[0:1][:].values
world_inflation.columns = columns[0]
world_inflation = world_inflation[1:]
world_inflation.head()
Out[32]:
Albania Algeria American Samoa Andorra Angola Antigua and Barbuda Argentina Armenia Aruba Australia ... United States Uruguay Uzbekistan Vanuatu Venezuela, RB Vietnam Virgin Islands (U.S.) West Bank and Gaza Yemen, Rep. Zambia
.. -0.43 30.26 .. 7.33 14.01 1.65 2078.32 .. 5.82 6.10 ... 3.74 106.84 3.98 -1.00 41.74 42.10 .. .. .. 106.39
...1 35.51 53.79 .. 6.94 106.31 2.61 140.50 79.39 5.61 3.04 ... 3.38 100.81 90.73 10.30 21.45 72.55 .. .. 12.00 92.65
...2 232.98 21.93 .. 6.71 476.52 2.46 16.07 568.81 3.79 1.50 ... 2.28 59.62 712.15 2.78 28.24 32.63 .. .. 13.17 165.53
...3 125.65 13.62 .. 4.54 917.78 1.81 -3.56 1391.17 5.30 0.89 ... 2.37 47.85 1078.88 2.05 31.65 17.41 .. .. 16.38 143.66
...4 35.84 29.08 .. 3.88 2175.98 3.25 2.85 4107.30 6.30 1.02 ... 2.14 38.96 1238.60 2.35 62.89 16.95 .. .. 20.78 80.74

5 rows × 215 columns

In [33]:
years = [i for i in range(1990,2020)]
num_of_years = 30
vietnam_inflation = pd.DataFrame({'years' : years, 'inflation' : world_inflation['Vietnam'].values, 'label' : ['VietNam'] * num_of_years})
china_inflation = pd.DataFrame({'years' : years,'inflation' : world_inflation['China'].values, 'label' : ['China'] * num_of_years})
india_inflation = pd.DataFrame({'years' : years,'inflation' : world_inflation['India'].values, 'label' : ['India'] * num_of_years})
chile_inflation = pd.DataFrame({'years' : years,'inflation' : world_inflation['Chile'].values, 'label' : ['Chile'] * num_of_years})
bangladesh_inflation = pd.DataFrame({'years' : years,'inflation' : world_inflation['Bangladesh'].values, 'label' : ['Bangladesh'] * num_of_years})

new_world_inflation = pd.concat([vietnam_inflation,china_inflation,india_inflation,chile_inflation,bangladesh_inflation])
In [34]:
fig_line = px.line(new_world_inflation, x='years', y='inflation', color='label')
fig_line.show()

Popualtion

In [37]:
world_population = pd.read_csv('C:/Users/DUC/Documents/Data/GDP/WorldPopulation.csv')
world_population = world_population.T
columns = world_population[0:1][:].values
world_population.columns = columns[0]
world_population = world_population[1:]
world_population.head()
Out[37]:
Albania Algeria American Samoa Andorra Angola Antigua and Barbuda Argentina Armenia Aruba Australia ... Uruguay Uzbekistan Vanuatu Venezuela, RB Vietnam Virgin Islands (U.S.) West Bank and Gaza Yemen, Rep. Zambia Zimbabwe
12412308.00 3286542.00 25758869.00 47347.00 54509.00 11848386.00 62528.00 32618651.00 3538171.00 62149.00 17065100.00 ... 3109601.00 20510000.00 146573.00 19632665.00 67988862.00 103963.00 1978248.00 11709993.00 8036845.00 10432421.00
13299017.00 3266790.00 26400479.00 48685.00 56671.00 12248901.00 63367.00 33079000.00 3505258.00 64622.00 17284000.00 ... 3131660.00 20952000.00 150716.00 20096317.00 69436954.00 104807.00 2068845.00 12302124.00 8246656.00 10680995.00
14485546.00 3247039.00 27028326.00 49896.00 58888.00 12657366.00 64471.00 33529326.00 3442817.00 68235.00 17495000.00 ... 3154464.00 21449000.00 155170.00 20557683.00 70883481.00 105712.00 2163591.00 12954155.00 8451347.00 10900502.00
15816603.00 3227287.00 27635515.00 51020.00 60971.00 13075049.00 65777.00 33970111.00 3363108.00 72504.00 17667000.00 ... 3177745.00 21942000.00 159744.00 21016901.00 72300308.00 106578.00 2262676.00 13634076.00 8656486.00 11092766.00
17075727.00 3207536.00 28213774.00 52095.00 62677.00 13503747.00 67204.00 34402672.00 3283667.00 76700.00 17855000.00 ... 3201151.00 22377000.00 164129.00 21474549.00 73651218.00 107318.00 2366298.00 14297613.00 8869740.00 11261744.00

5 rows × 216 columns

In [39]:
years = [i for i in range(1990,2020)]
num_of_years = 30
vietnam_population = pd.DataFrame({'years' : years, 'population' : world_population['Vietnam'].values, 'label' : ['VietNam'] * num_of_years})
china_population = pd.DataFrame({'years' : years,'population' : world_population['China'].values, 'label' : ['China'] * num_of_years})
india_population = pd.DataFrame({'years' : years,'population' : world_population['India'].values, 'label' : ['India'] * num_of_years})
chile_population = pd.DataFrame({'years' : years,'population' : world_population['Chile'].values, 'label' : ['Chile'] * num_of_years})
bangladesh_population = pd.DataFrame({'years' : years,'population' : world_population['Bangladesh'].values, 'label' : ['Bangladesh'] * num_of_years})

new_world_population = pd.concat([vietnam_population,china_population,india_population,chile_population,bangladesh_population])
In [41]:
fig_line = px.line(new_world_population, x='years', y='population', color='label')
fig_line.show()

CO2 Emission (metrics of ton per capita)

In [2]:
world_co2_emission = pd.read_csv('C:/Users/DUC/Documents/Data/GDP/CO2Emission.csv')
world_co2_emission = world_co2_emission.T
columns = world_co2_emission[0:1][:].values
world_co2_emission.columns = columns[0]
world_co2_emission = world_co2_emission[1:]
world_co2_emission.head()
Out[2]:
Albania Algeria American Samoa Andorra Angola Antigua and Barbuda Argentina Armenia Aruba Australia ... Uruguay Uzbekistan Vanuatu Venezuela, RB Vietnam Virgin Islands (U.S.) West Bank and Gaza Yemen, Rep. Zambia Zimbabwe
0.21 1.68 2.99 .. 7.47 0.43 4.52 3.44 .. 26.37 15.45 ... 1.28 .. 0.45 6.22 0.31 .. .. 0.82 0.30 1.50
0.18 1.31 2.99 .. 7.18 0.42 4.22 3.54 .. 26.05 15.13 ... 1.45 .. 0.44 5.74 0.31 .. .. 0.75 0.29 1.49
0.10 0.77 2.96 .. 6.91 0.41 4.10 3.62 1.69 21.44 15.32 ... 1.64 5.21 0.40 5.15 0.30 .. .. 0.77 0.29 1.56
0.09 0.72 2.97 .. 6.74 0.44 4.13 3.47 0.76 22.00 15.70 ... 1.41 5.30 0.39 5.92 0.32 .. .. 0.64 0.29 1.48
0.08 0.60 3.06 .. 6.49 0.29 3.98 3.56 0.82 21.04 15.58 ... 1.27 4.86 0.38 6.05 0.36 .. .. 0.63 0.27 1.58

5 rows × 216 columns

In [3]:
years = [i for i in range(1990,2016)]
num_of_years = 26
vietnam_co2_emission = pd.DataFrame({'years' : years, 'co2 emission' : world_co2_emission['Vietnam'].values, 'label' : ['VietNam'] * num_of_years})
china_co2_emission = pd.DataFrame({'years' : years,'co2 emission' : world_co2_emission['China'].values, 'label' : ['China'] * num_of_years})
india_co2_emission = pd.DataFrame({'years' : years,'co2 emission' : world_co2_emission['India'].values, 'label' : ['India'] * num_of_years})
chile_co2_emission = pd.DataFrame({'years' : years,'co2 emission' : world_co2_emission['Chile'].values, 'label' : ['Chile'] * num_of_years})
bangladesh_co2_emission = pd.DataFrame({'years' : years,'co2 emission' : world_co2_emission['Bangladesh'].values, 'label' : ['Bangladesh'] * num_of_years})

new_world_co2_emission = pd.concat([vietnam_co2_emission,china_co2_emission,india_co2_emission,chile_co2_emission,bangladesh_co2_emission])
In [4]:
fig_line = px.line(new_world_co2_emission, x='years', y='co2 emission', color='label')
fig_line.show()

co2 emission 2014

In [23]:
new_world_co2_emission_2014 = new_world_co2_emission[new_world_co2_emission['years'] == 2014]
fig_bar = px.bar(new_world_co2_emission_2014, x = 'label', y='co2 emission', color = 'label')
fig_bar.show()

co2 emission 1990

In [26]:
new_world_co2_emission_1900 = new_world_co2_emission[new_world_co2_emission['years'] == 1990]
new_world_co2_emission_1900
fig_bar = px.bar(new_world_co2_emission_1900, x = 'label', y='co2 emission', color='label')
fig_bar.show()

Poverty headcount ratio

In [62]:
world_poverty_headcount_ratio = pd.read_csv('C:/Users/DUC/Documents/Data/GDP/Poverty headcount ratio.csv')
world_poverty_headcount_ratio = world_poverty_headcount_ratio.T
columns = world_poverty_headcount_ratio[0:1][:].values
world_poverty_headcount_ratio.columns = columns[0]
world_poverty_headcount_ratio = world_poverty_headcount_ratio[1:]
world_poverty_headcount_ratio.head()
Out[62]:
Albania Algeria American Samoa Andorra Angola Antigua and Barbuda Argentina Armenia Aruba Australia ... Uruguay Uzbekistan Vanuatu Venezuela, RB Vietnam Virgin Islands (U.S.) West Bank and Gaza Yemen, Rep. Zambia Zimbabwe
.. .. .. .. .. .. .. .. .. .. .. ... .. .. .. .. .. .. .. .. .. ..
...1 .. .. .. .. .. .. .. .. .. .. ... .. .. .. .. .. .. .. .. .. ..
...2 .. .. .. .. .. .. .. .. .. .. ... .. .. .. .. .. .. .. .. .. ..
...3 .. .. .. .. .. .. .. .. .. .. ... .. .. .. .. .. .. .. .. .. ..
...4 .. .. .. .. .. .. .. .. .. .. ... .. .. .. .. .. .. .. .. .. ..

5 rows × 216 columns

In [63]:
years = [i for i in range(1990,2019)]
num_of_years = 29
vietnam_co2_poverty_headcount_ratio = pd.DataFrame({'years' : years, 'poverty_headcount_ratio' : world_poverty_headcount_ratio['Vietnam'].values, 'label' : ['VietNam'] * num_of_years})
china_co2_poverty_headcount_ratio = pd.DataFrame({'years' : years,'poverty_headcount_ratio' : world_poverty_headcount_ratio['China'].values, 'label' : ['China'] * num_of_years})
india_co2_poverty_headcount_ratio = pd.DataFrame({'years' : years,'poverty_headcount_ratio' : world_poverty_headcount_ratio['India'].values, 'label' : ['India'] * num_of_years})
chile_co2_poverty_headcount_ratio = pd.DataFrame({'years' : years,'poverty_headcount_ratio' : world_poverty_headcount_ratio['Chile'].values, 'label' : ['Chile'] * num_of_years})
bangladesh_co2_poverty_headcount_ratio = pd.DataFrame({'years' : years,'poverty_headcount_ratio' : world_poverty_headcount_ratio['Bangladesh'].values, 'label' : ['Bangladesh'] * num_of_years})

new_world_poverty_headcount_ratio = pd.concat([vietnam_co2_poverty_headcount_ratio,china_co2_poverty_headcount_ratio,india_co2_poverty_headcount_ratio,chile_co2_poverty_headcount_ratio,bangladesh_co2_poverty_headcount_ratio])
In [64]:
fig_line = px.line(new_world_poverty_headcount_ratio, x='years', y='poverty_headcount_ratio', color='label')
fig_line.show()

Industry (including construction), value added (% of GDP)

In [65]:
world_industry_value_added = pd.read_csv('C:/Users/DUC/Documents/Data/GDP/Industry value added.csv')
world_industry_value_added = world_industry_value_added.T
columns = world_industry_value_added[0:1][:].values
world_industry_value_added.columns = columns[0]
world_industry_value_added = world_industry_value_added[1:]
world_industry_value_added.head()
Out[65]:
Algeria American Samoa Andorra Angola Antigua and Barbuda Argentina Armenia Aruba Australia Austria ... Uruguay Uzbekistan Vanuatu Venezuela, RB Vietnam Virgin Islands (U.S.) West Bank and Gaza Yemen, Rep. Zambia Zimbabwe
.. .. .. .. .. 13.91 36.02 .. .. 28.87 29.56 ... 34.64 33.31 14.09 57.75 22.67 .. .. 34.34 45.29 29.80
...1 .. .. .. .. 14.56 32.72 .. .. 27.74 29.51 ... 35.55 36.68 12.72 53.49 23.79 .. .. 30.66 46.28 33.20
...2 .. .. .. .. 13.48 30.68 .. .. 26.95 29.02 ... 32.78 36.13 10.90 51.49 27.26 .. .. 27.64 43.73 37.21
...3 .. .. .. .. 12.71 27.34 .. .. 26.90 28.30 ... 29.66 31.23 10.05 48.66 28.90 .. .. 25.38 37.44 30.46
...4 .. .. .. .. 12.53 26.75 .. .. 26.86 28.41 ... 28.00 24.25 12.70 40.87 28.87 .. 33.15 25.15 37.32 29.15

5 rows × 215 columns

In [67]:
years = [i for i in range(1990,2020)]
num_of_years = 30
vietnam_industry_value_added = pd.DataFrame({'years' : years, 'industry_value_added' : world_industry_value_added['Vietnam'].values, 'label' : ['VietNam'] * num_of_years})
china_industry_value_added = pd.DataFrame({'years' : years,'industry_value_added' : world_industry_value_added['China'].values, 'label' : ['China'] * num_of_years})
india_industry_value_added = pd.DataFrame({'years' : years,'industry_value_added' : world_industry_value_added['India'].values, 'label' : ['India'] * num_of_years})
chile_industry_value_added = pd.DataFrame({'years' : years,'industry_value_added' : world_industry_value_added['Chile'].values, 'label' : ['Chile'] * num_of_years})
bangladesh_industry_value_added = pd.DataFrame({'years' : years,'industry_value_added' : world_industry_value_added['Bangladesh'].values, 'label' : ['Bangladesh'] * num_of_years})

new_world_industry_value_added = pd.concat([vietnam_industry_value_added,china_industry_value_added,india_industry_value_added,chile_industry_value_added,bangladesh_industry_value_added])
In [68]:
fig_line = px.line(new_world_industry_value_added, x='years', y='industry_value_added', color='label')
fig_line.show()
In [70]:
fig_line = px.line(new_world_stock_marketcap, x = 'years', y = 'stock_marketcap', color = 'label')
fig_line.show()

External debt stocks, total (DOD, current US$)

In [71]:
world_external_debt_stock = pd.read_csv('C:/Users/DUC/Documents/Data/GDP/External debt stocks.csv')
world_external_debt_stock = world_external_debt_stock.T
columns = world_external_debt_stock[0:1][:].values
world_external_debt_stock.columns = columns[0]
world_external_debt_stock = world_external_debt_stock[1:]
world_external_debt_stock.head()
Out[71]:
Albania Algeria American Samoa Andorra Angola Antigua and Barbuda Argentina Armenia Aruba Australia ... Uruguay Uzbekistan Vanuatu Venezuela, RB Vietnam Virgin Islands (U.S.) West Bank and Gaza Yemen, Rep. Zambia Zimbabwe
0.00 0.00 28153911739.30 .. .. 8591895991.10 .. 62477601311.90 0.00 .. .. ... .. 0.00 38217710.60 33172570887.60 23270062150.10 .. .. 6354026972.50 6904814239.40 3317686594.10
0.00.1 511485756.30 28489965549.10 .. .. 9000344458.80 .. 65672366930.10 0.00 .. .. ... .. 0.00 34869375.10 34123003209.90 23395041592.50 .. .. 6475141178.70 6958488380.00 3515835605.10
0.00.2 632621789.20 27351247767.30 .. .. 10059207810.70 .. 68605638952.40 0.00 .. .. ... .. 59702042.90 36227064.60 37849456577.40 24389145840.70 .. .. 6573081090.50 6700065955.60 4170701445.10
0.00.3 786033591.20 26274665108.10 .. .. 10571384637.80 .. 64681387080.30 133922025.20 .. .. ... .. 1031699376.20 40189501.80 37540190896.20 24224319557.60 .. .. 5944866677.90 6477914987.80 4315438845.30
0.00.4 883115193.80 30241927924.70 .. .. 11292755787.90 .. 75094061335.70 214328549.40 .. .. ... .. 1247180534.10 45581300.90 36943075421.10 24855517887.40 .. .. 6153597464.70 6808521300.70 4565936832.40

5 rows × 216 columns

In [72]:
years = [i for i in range(1990,2020)]
num_of_years = 30
vietnam_external_debt_stock= pd.DataFrame({'years' : years, 'external_debt_stock' : world_external_debt_stock['Vietnam'].values, 'label' : ['VietNam'] * num_of_years})
china_external_debt_stock = pd.DataFrame({'years' : years,'external_debt_stock' : world_external_debt_stock['China'].values, 'label' : ['China'] * num_of_years})
india_external_debt_stock = pd.DataFrame({'years' : years,'external_debt_stock' : world_external_debt_stock['India'].values, 'label' : ['India'] * num_of_years})
chile_external_debt_stock = pd.DataFrame({'years' : years,'external_debt_stock' : world_external_debt_stock['Chile'].values, 'label' : ['Chile'] * num_of_years})    
bangladesh_external_debt_stock = pd.DataFrame({'years' : years,'external_debt_stock' : world_external_debt_stock['Bangladesh'].values, 'label' : ['Bangladesh'] * num_of_years})

new_world_external_debt_stock = pd.concat([vietnam_external_debt_stock,china_external_debt_stock,india_external_debt_stock,chile_external_debt_stock,bangladesh_external_debt_stock])
In [73]:
fig_line = px.line(new_world_external_debt_stock, x = 'years', y = 'external_debt_stock', color = 'label')
fig_line.show()

Forein direct invest

In [78]:
world_forein_direct_invest = pd.read_csv('C:/Users/DUC/Documents/Data/GDP/Foreign direct investment.csv')
world_forein_direct_invest = world_forein_direct_invest.T
columns = world_forein_direct_invest[0:1][:].values
world_forein_direct_invest.columns = columns[0]
world_forein_direct_invest = world_forein_direct_invest[1:]
world_forein_direct_invest.head()
Out[78]:
Angola Antigua and Barbuda Argentina Armenia Aruba Australia Austria Azerbaijan Bahamas, The Bahrain ... Uruguay Uzbekistan Vanuatu Venezuela, RB Vietnam Virgin Islands (U.S.) West Bank and Gaza Yemen, Rep. Zambia Zimbabwe
.. -334800000.00 60607407.41 1836000000.00 .. 130502793.30 8457776859.55 653000000.00 .. -17000000.00 91755319.15 ... 41540000.00 .. 13111196.87 451000000.00 180000000.00 .. .. -130900000.00 202700000.00 -12205847.82
...1 664500000.00 54792592.59 2439000000.00 .. 184748603.35 2612066526.44 360000000.00 .. -1300000.00 619414893.62 ... 32340000.00 .. 25474518.48 1916000000.00 375190278.00 .. .. 282500000.00 34300000.00 2790485.90
...2 287956000.00 19648148.15 4430977523.08 2400000.00 -36983240.22 4941906671.71 1485518379.90 .. 300000.00 868617021.28 ... 11300000.00 9000000.00 26452893.62 629000000.00 473945856.00 .. .. 718000000.00 45000000.00 14949899.55
...3 302100000.00 15240740.74 2793085410.10 800000.00 -17932960.89 5312435141.59 1125106168.00 10000.00 27300000.00 -275000007.92 ... 101500000.00 48000000.00 25967921.31 372000000.00 926303715.00 .. .. 903000000.00 314400000.00 27955135.35
...4 170300000.00 24788888.89 3634931878.26 8000000.00 -73184357.54 4458484243.65 2075823025.36 22000000.00 23600000.00 208244700.24 ... 154500000.00 73000000.00 29786175.56 801000000.00 1944515936.00 .. .. 15800000.00 40000000.00 34648879.65

5 rows × 212 columns

In [79]:
years = [i for i in range(1990,2020)]
num_of_years = 30
vietnam_forein_direct_invest= pd.DataFrame({'years' : years, 'forein_direct_invest' : world_forein_direct_invest['Vietnam'].values, 'label' : ['VietNam'] * num_of_years})
china_forein_direct_invest = pd.DataFrame({'years' : years,'forein_direct_invest' : world_forein_direct_invest['China'].values, 'label' : ['China'] * num_of_years})
india_forein_direct_invest = pd.DataFrame({'years' : years,'forein_direct_invest' : world_forein_direct_invest['India'].values, 'label' : ['India'] * num_of_years})
chile_forein_direct_invest = pd.DataFrame({'years' : years,'forein_direct_invest' : world_forein_direct_invest['Chile'].values, 'label' : ['Chile'] * num_of_years})    
bangladesh_forein_direct_invest = pd.DataFrame({'years' : years,'forein_direct_invest' : world_forein_direct_invest['Bangladesh'].values, 'label' : ['Bangladesh'] * num_of_years})

new_world_forein_direct_invest = pd.concat([vietnam_forein_direct_invest,china_forein_direct_invest,india_forein_direct_invest,chile_forein_direct_invest,bangladesh_forein_direct_invest])
In [82]:
fig_line = px.line(new_world_forein_direct_invest, x = 'years', y = 'forein_direct_invest', color = 'label')
fig_line.show()
In [83]:
fig_line = px.line(new_world_stock_marketcap, x = 'years', y = 'stock_marketcap', color = 'label')
fig_line.show()
In [ ]: